package com.zhaoxi.project.wms.service.impl;

import java.util.List;
import com.zhaoxi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhaoxi.project.wms.mapper.WmsOrderTypeMapper;
import com.zhaoxi.project.wms.domain.WmsOrderType;

/**
 * 产品入库录Service业务层处理
 * 
 * @author zhaoxi
 * @date 2023-07-22
 */
@Service
public class WmsOrderTypeServiceImpl
{
    @Autowired
    private WmsOrderTypeMapper wmsOrderTypeMapper;

    /**
     * 查询产品入库录
     * 
     * @param id 产品入库录主键
     * @return 产品入库录
     */
    
    public WmsOrderType selectWmsOrderTypeById(Long id)
    {
        return wmsOrderTypeMapper.selectWmsOrderTypeById(id);
    }

    /**
     * 查询产品入库录列表
     * 
     * @param wmsOrderType 产品入库录
     * @return 产品入库录
     */
    
    public List<WmsOrderType> selectWmsOrderTypeList(WmsOrderType wmsOrderType)
    {
        return wmsOrderTypeMapper.selectWmsOrderTypeList(wmsOrderType);
    }

    /**
     * 新增产品入库录
     * 
     * @param wmsOrderType 产品入库录
     * @return 结果
     */
    
    public int insertWmsOrderType(WmsOrderType wmsOrderType)
    {
        wmsOrderType.setCreateTime(DateUtils.getNowDate());
        return wmsOrderTypeMapper.insertWmsOrderType(wmsOrderType);
    }

    /**
     * 修改产品入库录
     * 
     * @param wmsOrderType 产品入库录
     * @return 结果
     */
    
    public int updateWmsOrderType(WmsOrderType wmsOrderType)
    {
        wmsOrderType.setUpdateTime(DateUtils.getNowDate());
        return wmsOrderTypeMapper.updateWmsOrderType(wmsOrderType);
    }

    /**
     * 批量删除产品入库录
     * 
     * @param ids 需要删除的产品入库录主键
     * @return 结果
     */
    
    public int deleteWmsOrderTypeByIds(Long[] ids)
    {
        return wmsOrderTypeMapper.deleteWmsOrderTypeByIds(ids);
    }

    /**
     * 删除产品入库录信息
     * 
     * @param id 产品入库录主键
     * @return 结果
     */
    
    public int deleteWmsOrderTypeById(Long id)
    {
        return wmsOrderTypeMapper.deleteWmsOrderTypeById(id);
    }
}
